package com.learn.micro_mall.domain.vo.member;

import lombok.Data;

@Data
public class MemberLevelPriorityVO {

    /**
     * 能够领取的会员优惠券的数量
     */
    private Integer couponsNum;

    /**
     * 商品打折
     */
    private Integer discount;


    public void valid() throws Exception {
        if(couponsNum == null || couponsNum < 0 || discount == null || discount <= 0 || discount > 100 ){
            throw new Exception("会员权益设置不正确");
        }
    }
}
